package com.learn.spring.ioc.way.bean;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BeanConfig {

    @Bean
    public User user() {
        return new User();
    }

    @Bean
    public BeanTest beanTest() {
        return new BeanTest(user());
    }

    @Bean
    public BeanTest beanTest1() {
        return new BeanTest(user());
    }

}
